import com.hxz.pojo.People;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyTest1 {
    @Test
    public void testp() {
        ApplicationContext ac = new ClassPathXmlApplicationContext("beans.xml");
        People people = (People) ac.getBean("people");
        people.getCat().shut();
        people.getDog().shut();
    }
}
